
import request from '@/utils/request';
import {REQUEST_CONFIG} from "@/data/basic_data";

export function listData(query) {
  return request({
    url: `/content-manager/list-ad${query}`,
    method: 'get',
  });
}


export function postAddData(form) {
  return request({
    url: '/content-manager/list-ad',
    method: 'post',
    data: form,
    [REQUEST_CONFIG.PARSE]: false
  });
}

export function putEditData(id,form) {
  return request({
    url: `/content-manager/list-ad/${id}`,
    method: 'put',
    data: form,
    [REQUEST_CONFIG.PARSE]: false
  });
}

export function deleteData(form) {
  return request({
    url: '/content-manager/list-ad',
    method: 'delete',
    data: form
  });
}

/**
 * getListAdCategory
 * @desc 获取轮播图类别
 * @returns { AxiosPromise }
 */
export function getListAdCategory() {
  return request({
    url: '/content-manager/list-ad/category',
    method: 'get'
  })
}


/**
 * getBannerSkip
 * @desc 获取我的界面banner跳转类型
 * @returns {AxiosPromise}
 */
export function getBannerSkip() {
  return request({
    url: '/content-manager/list-ad/banner-skip',
    method: 'get'
  })
}



